package com.example.myapplication.ApiServices;

import io.reactivex.rxjava3.core.Flowable;
import okhttp3.MultipartBody;
import okhttp3.ResponseBody;
import retrofit2.Call;
import retrofit2.http.GET;
import retrofit2.http.Multipart;
import retrofit2.http.POST;
import retrofit2.http.Part;
import retrofit2.http.Streaming;
import retrofit2.http.Url;

/**
 * @author sjh
 * @Description
 * @create 2022/3/8 16:15
 */
public interface UploadApiService {

    @POST("post")
    @Multipart
    Call<ResponseBody> upload(@Part MultipartBody.Part file);

    @GET
    Call<ResponseBody> download(@Url String url);

    @Streaming   //方式内存溢出
    @GET
    Flowable<ResponseBody> download2(@Url String url);

}
